import { get, post, put, del } from '../../utils/httpUtil'

/*员工管理*/
const apis = {}

/*获取员工管理列表*/
apis.getStaffMessageList = () => {
    return get('/staffMessage/list')
}

//根据id获取详情
apis.getDetail = id => {
	return get('/staffMessage/detail?id='+id);
}
//更新或保存
apis.submitForm = submitFormData => {
	let url = '/staffMessage/save';
    if(submitFormData.id){
        url = '/staffMessage/update';
    }
    return post(url, submitFormData);
}
/*锁定 */

/*删除*/
apis.restoreStaffMessage = (that, params, callback) => {
    that.$confirm('是否确认恢复？', '提示').then(()=>{
        post('/staffMessage/restore', params).then((res)=>{
            that.msg.success('删除成功')
            callback(res)
        })
    }).catch(()=>{})
}


export default apis

